﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Collections.ObjectModel;
using System.Diagnostics;

namespace WP7Square.ViewModels
{
    public class SettingsViewModel : INotifyPropertyChanged
    {
        public SettingsViewModel()
        {
            var lightBrush = new SolidColorBrush(Color.FromArgb(25, 255, 255, 255));
            var darkBrush = new SolidColorBrush(Color.FromArgb(50, 255, 255, 255));
            this.Items = new ObservableCollection<SettingsItemViewModel>() {
                                new SettingsItemViewModel() {IconPath= "", LineTwo="", LineOne = "send to facebook", EventHandler="facebookChange"},
                                new SettingsItemViewModel(){IconPath= "", LineTwo="", LineOne = "send to twitter", EventHandler="facebookChange" },
                                new SettingsItemViewModel() {IconPath= "", LineTwo="",LineOne = "off the grid", EventHandler="facebookChange"  },
                                new SettingsItemViewModel() { IconPath= "", LineTwo="",LineOne = "Setting 4", EventHandler="login"},
                                new SettingsItemViewModel() { IconPath = "images/logout.png", LineOne = "Setting 5", LineTwo = "Setting 5 Line 2",   EventHandler="whatever"},
                        };
        }

        public ObservableCollection<SettingsItemViewModel> Items
        {
            get;
            private set;
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            // Ensure that the string being passed in is actually the name of a property.
            Debug.Assert(this.GetType().GetProperty(propertyName) != null);

            PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
